const mysql = require('mysql2/promise');

async function checkMovies() {
  const pool = mysql.createPool({
    host: 'localhost',
    user: 'root',
    password: '123456',
    database: 'movie_recommendation'
  });

  try {
    const [movies] = await pool.execute('SELECT id, title, image_url FROM movies LIMIT 5');
    console.log('电影数据示例 (包含图片URL):', JSON.stringify(movies, null, 2));
  } catch (error) {
    console.error('查询失败:', error);
  } finally {
    await pool.end();
  }
}

checkMovies(); 